package com.steven.forum.dao

import org.apache.ibatis.annotations.Insert
import org.apache.ibatis.annotations.Select
import org.springframework.stereotype.Repository

@Repository
interface UserFollowDao {
    @Select("SELECT * from user_follow_type where uid=#{uid}")
    fun queryUserFollow(uid: Long?): List<String>?

    @Insert("INSERT into user_follow_type(uid,type) VALUE(#{uid},#{type})")
    fun addUserFollow(uid: Long?, type: String?): Int

    @Select("select distinct(type) from match_type ORDER BY convert(type using gbk) asc")
    fun queryAllType(): List<String>?
}